package cn.redragon.soa.amqp.model;


import cn.redragon.soa.common.config.rabbit.CommonRabbitConfig;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.QueueBuilder;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RabbitConfig extends CommonRabbitConfig {

    @Bean
    public Queue inboundStockImportedDlq(@Value("${amqp.oms.inbound.stock.imported.dlqName}") final String dlqName) {
        return QueueBuilder.durable(dlqName).build();
    }

    @Bean
    public Queue innerStockUpdatedDlq(@Value("${amqp.inner.stock.updated.dlqName}") final String dlqName) {
        return QueueBuilder.durable(dlqName).build();
    }
}
